﻿@using Service.Infrastructure.Model
@{
    Layout = null;
    var dict = (Dictionary<Int32, Int32>)TempData["NotifData"];
    var task = (List<TaskModel>)TempData["TaskData"];
    var info = (ManagerModel)TempData["AccountInfo"];
}
<div class="header navbar navbar-inverse navbar-fixed-top">
    <!-- BEGIN TOP NAVIGATION BAR -->
    <div class="header-inner">
        <!-- BEGIN LOGO -->
        <a class="navbar-brand" href="@Url.Action("Index")">
            <img src="~/Img/se7en-logo.png" alt="logo" class="img-responsive">
        </a>
        <!-- END LOGO -->
        <!-- BEGIN RESPONSIVE MENU TOGGLER -->
        <a href="javascript:;" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
            <img src="~/Img/se7en-logo.png" alt="">
        </a>
        <!-- END RESPONSIVE MENU TOGGLER -->
        <!-- BEGIN TOP NAVIGATION MENU -->
        <ul class="nav navbar-nav pull-right">

            <!-- BEGIN NOTIFICATION DROPDOWN -->
            <li class="dropdown" id="header_notification_bar">
                <a href="#" class="dropdown-toggle" data-toggle="dropdown" data-hover="dropdown" data-close-others="true">
                    <i class="fa fa-warning"></i>
                    <span class="badge">@Html.Raw(dict[1000] + dict[2000])</span>
                </a>
                <ul class="dropdown-menu extended notification">
                    <li>
                        <p>您有 @Html.Raw(dict[1000] + dict[2000]) 条通知</p>
                    </li>
                    <li>
                        <div class="slimScrollDiv" style="position: relative; overflow: hidden; width: auto; height: 250px;">
                            <ul class="dropdown-menu-list scroller" style="height: 250px; overflow: hidden; width: auto;">

                                <li>
                                    <a href="@Url.Action("ExceptionLog","Admin")">

                                        <span class="label label-sm label-icon label-warning"><i class="fa fa-bell-o"></i></span>
                                        共有 @dict[1000] 异常信息
                                    </a>
                                </li>
                                <li>
                                    <a href="@Url.Action("UserLog","Admin")">
                                        <span class="label label-sm label-icon label-info"><i class="fa fa-bell-o"></i></span>
                                        共有 @dict[2000] 用户浏览信息
                                    </a>
                                </li>


                            </ul><div class="slimScrollBar" style="background-color: rgb(161, 178, 189); width: 7px; position: absolute; top: 0px; opacity: 0.4; display: block; border-top-left-radius: 7px; border-top-right-radius: 7px; border-bottom-right-radius: 7px; border-bottom-left-radius: 7px; z-index: 99; right: 1px; background-position: initial initial; background-repeat: initial initial;"></div><div class="slimScrollRail" style="width: 7px; height: 100%; position: absolute; top: 0px; display: none; border-top-left-radius: 7px; border-top-right-radius: 7px; border-bottom-right-radius: 7px; border-bottom-left-radius: 7px; background-color: rgb(51, 51, 51); opacity: 0.2; z-index: 90; right: 1px; background-position: initial initial; background-repeat: initial initial;"></div>
                        </div>
                    </li>
                    <li class="external">
                        <a href="#">查看所有通知<i class="m-icon-swapright"></i></a>
                    </li>
                </ul>
            </li>
            <!-- END NOTIFICATION DROPDOWN -->
            <!-- BEGIN INBOX DROPDOWN -->
            <li class="dropdown" id="header_inbox_bar">
                <a href="#" class="dropdown-toggle" data-toggle="dropdown" data-hover="dropdown" data-close-others="true">
                    <i class="fa fa-envelope"></i>
                    <span class="badge">N</span>
                </a>
                <ul class="dropdown-menu extended inbox">
                    <li>
                        <p>您有 N 条站内消息</p>
                    </li>
                    <li>
                        <div class="slimScrollDiv" style="position: relative; overflow: hidden; width: auto; height: 250px;">
                            <ul class="dropdown-menu-list scroller" style="height: 250px; overflow: hidden; width: auto;">

                                <li>
                                    <a href="#">
                                        <span class="photo"><img src="~/Img/7-small.png" alt=""></span>
                                        <span class="subject">
                                            <span class="from"> XX用户</span>
                                            <span class="time">时间</span>
                                        </span>
                                        <span class="message">
                                            XXX消息
                                        </span>
                                    </a>
                                </li>
                            </ul><div class="slimScrollBar" style="background-color: rgb(161, 178, 189); width: 7px; position: absolute; top: 0px; opacity: 0.4; display: block; border-top-left-radius: 7px; border-top-right-radius: 7px; border-bottom-right-radius: 7px; border-bottom-left-radius: 7px; z-index: 99; right: 1px; background-position: initial initial; background-repeat: initial initial;"></div><div class="slimScrollRail" style="width: 7px; height: 100%; position: absolute; top: 0px; display: none; border-top-left-radius: 7px; border-top-right-radius: 7px; border-bottom-right-radius: 7px; border-bottom-left-radius: 7px; background-color: rgb(51, 51, 51); opacity: 0.2; z-index: 90; right: 1px; background-position: initial initial; background-repeat: initial initial;"></div>
                        </div>
                    </li>
                    <li class="external">
                        <a href="#">查看所有信息 <i class="m-icon-swapright"></i></a>
                    </li>
                </ul>
            </li>
            <!-- END INBOX DROPDOWN -->
            <!-- BEGIN TASK DROPDOWN -->
            <li class="dropdown" id="header_task_bar">
                <a href="#" class="dropdown-toggle" data-toggle="dropdown" data-hover="dropdown" data-close-others="true">
                    <i class="fa fa-tasks"></i>
                    <span class="badge">5</span>
                </a>
                <ul class="dropdown-menu extended tasks">
                    <li>
                        <p>您有 @task.Count 未完成任务</p>
                    </li>
                    <li>
                        <div class="slimScrollDiv" style="position: relative; overflow: hidden; width: auto; height: 250px;">
                            <ul class="dropdown-menu-list scroller" style="height: 250px; overflow: hidden; width: auto;">
                                @foreach (var m in task)
                                {
                                    <li>
                                        <a href="#">
                                            <span class="task">
                                                <span class="desc">@m.Description</span>
                                                <span class="percent">@m.Percent</span>
                                            </span>
                                            <span class="progress">
                                                @if (m.Type == 1)
                                                {
                                                    <span style="width: @m.Percent;" class="progress-bar progress-bar-success" aria-valuenow="40" aria-valuemin="0" aria-valuemax="100">
                                                        <span class="sr-only">@m.Percent 完成</span>
                                                    </span>
                                                }
                                                @if (m.Type == 2)
                                                {
                                                    <span class="progress progress-striped">
                                                        <span style="width: @m.Percent ;" class="progress-bar progress-bar-danger" aria-valuenow="65" aria-valuemin="0" aria-valuemax="100">
                                                            <span class="sr-only">>@m.Percent Complete</span>
                                                        </span>
                                                    </span>
                                                }
                                                @if (m.Type == 3)
                                                {
                                                    <span class="progress progress-striped">
                                                        <span style="width: @m.Percent ;" class="progress-bar progress-bar-warning" aria-valuenow="10" aria-valuemin="0" aria-valuemax="100">
                                                            <span class="sr-only">@m.Percent Complete</span>
                                                        </span>
                                                    </span>
                                                }
                                                @if (m.Type == 4)
                                                {
                                                    <span class="progress progress-striped">
                                                        <span style="width: @m.Percent ;" class="progress-bar progress-bar-info" aria-valuenow="58" aria-valuemin="0" aria-valuemax="100">
                                                            <span class="sr-only">@m.Percent Complete</span>
                                                        </span>
                                                    </span>
                                                }
                                                @if (m.Type == 5)
                                                {
                                                    <span class="progress progress-striped">
                                                        <span style="width: @m.Percent;" class="progress-bar progress-bar-important" aria-valuenow="18" aria-valuemin="0" aria-valuemax="100">
                                                            <span class="sr-only">@m.Percent Complete</span>
                                                        </span>
                                                    </span>
                                                }
                                            </span>
                                        </a>
                                    </li>
                                }

                            </ul><div class="slimScrollBar" style="background-color: rgb(161, 178, 189); width: 7px; position: absolute; top: 0px; opacity: 0.4; display: block; border-top-left-radius: 7px; border-top-right-radius: 7px; border-bottom-right-radius: 7px; border-bottom-left-radius: 7px; z-index: 99; right: 1px; background-position: initial initial; background-repeat: initial initial;"></div><div class="slimScrollRail" style="width: 7px; height: 100%; position: absolute; top: 0px; display: none; border-top-left-radius: 7px; border-top-right-radius: 7px; border-bottom-right-radius: 7px; border-bottom-left-radius: 7px; background-color: rgb(51, 51, 51); opacity: 0.2; z-index: 90; right: 1px; background-position: initial initial; background-repeat: initial initial;"></div>
                        </div>
                    </li>
                    <li class="external">
                        <a href="#">查看所有任务<i class="m-icon-swapright"></i></a>
                    </li>
                </ul>
            </li>
            <!-- END TASK DROPDOWN -->
            <!-- BEGIN USER LOGIN DROPDOWN -->
            <li class="dropdown user">
                <a href="http://www.keenthemes.com/preview/metronic_admin/index.html#" class="dropdown-toggle" data-toggle="dropdown" data-hover="dropdown" data-close-others="true">
                    <img alt="" src="~/Img/7-small.png">
                    <span class="username">@info.Name</span>
                    <i class="fa fa-angle-down"></i>
                </a>
                <ul class="dropdown-menu">
                    <li>
                        <a href="@Url.Action("MyProfile")"><i class="fa fa-user"></i> My Profile</a>
                    </li>
                    <li>
                        <a href="#"><i class="fa fa-calendar"></i> My Calendar</a>
                    </li>
                    <li>
                        <a href="#"><i class="fa fa-envelope"></i> 我的信息盒 <span class="badge badge-danger">@dict.Count</span></a>
                    </li>
                    <li>
                        <a href="#"><i class="fa fa-tasks"></i> 我的任务 <span class="badge badge-success">@task.Count</span></a>
                    </li>
                    <li class="divider"></li>
                    <li>
                        <a href="javascript:;" id="trigger_fullscreen"><i class="fa fa-move"></i> 全屏</a>
                    </li>
                    <li>
                        <a href="http://www.keenthemes.com/preview/metronic_admin/extra_lock.html"><i class="fa fa-lock"></i> 锁定界面</a>
                    </li>
                    <li>
                        <a href="http://www.keenthemes.com/preview/metronic_admin/login.html"><i class="fa fa-key"></i> 登出</a>
                    </li>
                </ul>
            </li>
            <!-- END USER LOGIN DROPDOWN -->

        </ul>
        <!-- END TOP NAVIGATION MENU -->
    </div>
    <!-- END TOP NAVIGATION BAR -->
</div>
